package com.freemalll.merchant.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.freemalll.merchant.common.AbstractBaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 商户审核流程
 * </p>
 *
 * @author songshixiong
 * @since 2025-06-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("mer_auth_flow")
@Schema(description = "MerAuthFlow对象")
public class MerAuthFlow extends AbstractBaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId(value = "flow_id", type = IdType.ASSIGN_UUID)
    private String flowId;

    @Schema(description = "所属商户")
    @TableField("mer_id")
    private String merId;

    @Schema(description = "审核状态 WITHDRAW：取消申请 SUBMIT_INITIAL_REVIEW：待提交初审 INITIAL_REVIEW_RETURNED：初审退回 INITIAL_REVIEW_PASSED：初审通过 PENDING_APPROVAL：待审核 APPROVING：审核中 SUPPLEMENTARY_PARTS：待补件 REVIEW_REFUSED：复审拒绝 REVIEW_RETURNED：复审退回 PENDING_SIGNING")
    @TableField("auth_status")
    private String authStatus;

    @Schema(description = "拒绝结论原因")
    @TableField("refused_reason")
    private String refusedReason;

    @Schema(description = "拒绝结论备注")
    @TableField("refused_remark")
    private String refusedRemark;

    @Schema(description = "审核类型 COLLABORATION_REVIEW:合作审核 ACTIVITY_REVIEW：活动审核 CHANGE_REVIEW：变更审核 CONTRACT_REVIEW：合同审核 INSPECTION_REVIEW：巡查审核")
    @TableField("audit_type")
    private String auditType;

    @Schema(description = "当前审核人 从审核中心待审核标签进入时设置值")
    @TableField("current_auth_man")
    private String currentAuthMan;

    @Schema(description = "当前审核人id")
    @TableField("current_auth_man_id")
    private String currentAuthManId;

    @Schema(description = "入审时间")
    @TableField("current_auth_date")
    private LocalDateTime currentAuthDate;

    @Schema(description = "审核时间")
    @TableField("auth_end_date")
    private LocalDateTime authEndDate;

    @Schema(description = "商户审核综合意见")
    @TableField("remarks")
    private String remarks;

    @Schema(description = "审批政策 多选逗号隔开")
    @TableField("audit_policy")
    private String auditPolicy;

    @Schema(description = "是否只支持消费贷 1是 0或null 否")
    @TableField("only_support_xfd")
    private Boolean onlySupportXfd;

    @Schema(description = "是否支持提额 1 是 0或null 否")
    @TableField("support_up_amount")
    private Boolean supportUpAmount;

    @Schema(description = "是否支持复议 1是 0或null 否")
    @TableField("support_appeal")
    private Boolean supportAppeal;

    @Schema(description = "是否开启lbs验证 1 是 0 否")
    @TableField("lbs_flag")
    private Boolean lbsFlag;

    @Schema(description = "限额方式:日限额,月限额，无限额")
    @TableField("amount_limit_type")
    private String amountLimitType;

    @Schema(description = "日限额")
    @TableField("daily_limit")
    private BigDecimal dailyLimit;

    @Schema(description = "月限额")
    @TableField("monthly_limit")
    private BigDecimal monthlyLimit;

    @Schema(description = "合同签约 1线上签约  2 线下签约")
    @TableField("contract_award")
    private Integer contractAward;

    @Schema(description = "补件次数")
    @TableField("supplement_num")
    private Integer supplementNum = 0;

    @Schema(description = "申请时间 提交复审的时间")
    @TableField("apply_time")
    private LocalDateTime applyTime;

    @Schema(description = "补件时间")
    @TableField("supplement_time")
    private LocalDateTime supplementTime;

    @Schema(description = "取消时间")
    @TableField("cancel_time")
    private LocalDateTime cancelTime;

    @Schema(description = "签约时间")
    @TableField("sign_time")
    private LocalDateTime signTime;


}
